const { defineConfig } = require('@vue/cli-service')
const port = process.env.port || process.env.npm_config_port || 9601 // dev port

module.exports = defineConfig({
  lintOnSave: false,
  transpileDependencies: true,
  devServer: {
    hot: true,
    port: port,
    proxy: {
      [process.env.VUE_APP_BASE_API]: {
        target: 'https://www.gxgeq.com',  //正式
        // target: 'http://192.168.203.26:1992',  //测试
        // target: 'http://192.168.1.112:9201',   //后端
        // changeOrigin: true,
        // pathRewrite: {
        //   ['^' + process.env.VUE_APP_BASE_API]: '/api'
        // }
      },
      '/code': {
        target: 'https://www.gxgeq.com',  //正式
        // target: 'http://192.168.203.26:1992',  //测试
        // target: 'http://192.168.1.107:9201',   //后端
        // changeOrigin: true,
        // pathRewrite: {
        //   '^/code': '/code'
        // }
      }
    },
  }
})
